load("//bazel:mongo_src_rules.bzl", "mongo_cc_library", "mongo_cc_unit_test")

package(default_visibility = ["//visibility:public"])

exports_files(
    glob([
        "*.h",
        "*.cpp",
    ]),
)

mongo_cc_library(
    name = "query_solution",
    srcs = [
        "query_solution.cpp",
        "stage_types.cpp",
    ],
    deps = [
        "//src/mongo:base",
        "//src/mongo/db:query_expressions",
        "//src/mongo/db/pipeline:accumulator",
        "//src/mongo/db/query:query_knobs",
        "//src/mongo/db/query/compiler/metadata:query_metadata",
        "//src/mongo/db/query/compiler/optimizer/index_bounds_builder",
        "//src/mongo/db/query/compiler/optimizer/join:join_predicate",
        "//src/mongo/db/query/compiler/physical_model/index_bounds",
    ],
)

mongo_cc_unit_test(
    name = "query_solution_test",
    srcs = ["query_solution_test.cpp"],
    tags = ["mongo_unittest_sixth_group"],
    deps = [
        ":query_solution",
        "//src/mongo/db/query:query_planner",
        "//src/mongo/db/query:query_test_service_context",
        "//src/mongo/db/query/collation:collator_interface_mock",
    ],
)
